package cn.chenxinjie.hrm.mapper;

import cn.chenxinjie.hrm.domain.Employee;
import cn.chenxinjie.hrm.vo.UserInfoVo;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chenxinjie
 * @since 2022-03-09
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    @Select("select t1.tel,t1.email,t2.address,t2.company_name comName from t_employee t1\n" +
            "LEFT JOIN t_tenant t2 ON t1.id = t2.admin_id\n" +
            "where t1.login_id = #{id}")
    UserInfoVo getTenantInfoById(Long id);
}
